package biz.almas.mulazim.task;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;


@WebListener
public class TaskListener implements ServletContextListener {
	private OrderTimerTask orderTimerTask = new OrderTimerTask();
	
	public void contextInitialized(ServletContextEvent sce) {
		orderTimerTask.start();
	}

	public void contextDestroyed(ServletContextEvent sce) {
		orderTimerTask.cancel();
	}
}
